package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Commdity;
import com.example.demo.entity.Shopcard1;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface Shop1Mapper extends BaseMapper<Shopcard1> {
    @Select("INSERT into Shopcard1(commodityid,number,relaid) values (#{commodityid},#{number},#{relaid})")
    Boolean addshopcard1(Integer commodityid,Integer number,Integer relaid);

    @Select("SELECT relaid FROM Shopcard1 where commodityid=#{commodityid} and relaid=#{relaid}")
    Boolean pandun1(Integer commodityid,Integer relaid);

    @Select("SELECT commodityid,relaid FROM Shopcard1 where commodityid=#{commodityid} and relaid=#{relaid}")
    Object findmessage(Integer commodityid,Integer relaid);
}
